#!/usr/bin/python
#coding = utf-8
 
import json
group = 'kvm'
hosts = ['10.17.2.189', '10.17.2.188', '10.17.2.173', '10.17.2.174']
vars = {'ansible_ssh_port': 22, 'ansible_connection': 'ssh', 'ansible_ssh_private_key_file': '/home/allenke/.ssh/allenkeOps'}
hostdata = {group:{"hosts": hosts, "vars": vars}}
print(json.dumps(hostdata, indent=4))
